<center>
<script>
  $(document).ready(function() {
    $("#accordion").accordion({ autoHeight: false });
    {{initjs}}
  });
  function loadInput(obj,contenttype,id,cvalue1,cvalue2)
  {
  	cvalue1=cvalue1?cvalue1:"";
  	cvalue2=cvalue2?cvalue2:"";
  	if(contenttype=="sale date")
  	{
  		if(jQuery(obj).val()=="between")
  		{
  			jQuery(obj).parent().parent().find(".input",0).html('<input type="text" name="criteriavalue['+id+'][from]" value="'+cvalue1+'" /> and <input type="text" name="criteriavalue['+id+'][to]" value="'+cvalue2+'" />');
  		}
  		else if(jQuery(obj).val()=="less")
  		{
  			jQuery(obj).parent().parent().find(".input",0).html('<input type="text" name="criteriavalue['+id+'][from]"  value="'+cvalue1+'" />');
		}
		else if(jQuery(obj).val()=="great")
  		{
  			jQuery(obj).parent().parent().find(".input",0).html('<input type="text" name="criteriavalue['+id+'][from]" value="'+cvalue1+'" />');
		}
		else
		{
			jQuery(obj).parent().parent().find(".input",0).html('&nbsp;');
		}
	}
	else if(contenttype=="quantitative")
	{
		if(jQuery(obj).val()=="")
		{
			jQuery(obj).parent().parent().find(".input",0).html('&nbsp;');
		}
		else
			jQuery(obj).parent().parent().find(".input",0).html('<input type="text" name="criteriavalue['+id+']" value="'+cvalue1+'" />');				
	}	
  }
  </script>
  <form action="index.php" name="settings">
	<div id="accordion">	<h3>
			<a href="#">General</a></h3>	
		<div>		
			<table>
				<tbody>
					<tr><td>Radius</td><td>:</td><td>
							<input type="text" value="" name="radius" /></td>
					</tr>
					<tr><td>Unit of Distance</td><td>:</td><td>
							<select name="unit">
								<option value="">- Select -
								</option>
							</select></td>
					</tr>
					<tr><td>Unit of Currency</td><td>:</td><td>
							<input type="text" value="" name="unit_of_currency" /></td>
					</tr>
					<tr><td>Distance Sorting</td><td>:</td><td>
							<select name="distance_sorting">
								<option value="">- Select -
								</option>
							</select></td>
					</tr>
					<tr><td>Sale Date Order</td><td>:</td><td>
							<select name="sale_date_order">
								<option value="">- Select -
								</option>
							</select></td>
					</tr>
					<tr><td>Adjusted Value Order</td><td>:</td><td>
							<select name="adjusted_value_order">
								<option value="">- Select -
								</option>
							</select></td>
					</tr>
					<tr><td>Default Adjustment Grid</td><td>:</td><td>
						<select name="default_adjustment_grid">
								<option value="">- Select -
								</option>
							</select>
							</td>
					</tr>
					<tr><td>Zoom Level</td><td>:</td><td>
							<input type="text" value="2" name="zoom_level" /></td>
					</tr>
					<tr><td>Scale Level</td><td>:</td><td>
							<input type="text" value="2" name="scale_level" /></td>
					</tr>
				</tbody>
			</table>	
		</div>	<h3>
			<a href="#">List Field</a></h3>	
		<div>		
		<table>
		<tr repeat="fldcomp">
			<td><input type="checkbox" var="fldcheck0" /></td><td var="fldcomp0"></td><td><input type="checkbox" var="fldcheck1" /></td><td var="fldcomp1"></td><td><input type="checkbox" var="fldcheck2" /></td><td var="fldcomp2"></td><td><input type="checkbox" var="fldcheck3" /></td><td var="fldcomp3"></td>
		</tr> 		
		</table>	
		</div>	<h3>
			<a href="#">Neighborhood Scoring</a></h3>	
		<div>		
			<table><tr repeat="listneighborhood">
			<td var="neighborhood"></td><td><input type="text" var="score" /></td>
			</tr></table>
		</div>	<h3>
			<a href="#">Comps Search Criteria</a></h3>	
		<div>		
			<table>
				<tr repeat="search_criteria">
					<td var="compfield"></td><td var="condition"></td><td class="input"></td>
				</tr>
			</table>	
		</div>
		<h3>
			<a href="#">Calendar Control</a></h3>	
		<div>		
			<table>
				<tr repeat="calendar_control">
					<td var="calendar"></td><td var="date"></td><td var="month"></td>
				</tr>
			</table>	
		</div>
	</div>
	<center><input type="submit" value="Submit" /></center>
</form>
</center>